package com.ssh.service;

import java.util.List;

import com.ssh.dao.impl.UserDaoImpl;
import com.ssh.model.User;

public class UserService {
	private UserDaoImpl userDao;

	public UserDaoImpl getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDaoImpl userDao) {
		this.userDao = userDao;
	}

	public void saveUser(User user) {
		userDao.saveUser(user);
	}

	public User getUserById(int id) {
		User user = userDao.getUserById(id);
		return user;
	}

	public void deleteUser(User user) {
		userDao.deleteUser(user);
	}

	public List<User> getAllUsers() {
		List<User> userList = userDao.getAllUsers();
		return userList;
	}
	
	public void modifyUser(User user) {
		userDao.modifyUser(user);
	}
}
